import 'package:json_annotation/json_annotation.dart';

part 'stats.g.dart';

@JsonSerializable()
class SummaryStats {
  final int recipeCount;
  final int categoryCount;
  final int workCount;

  const SummaryStats({
    required this.recipeCount,
    required this.categoryCount,
    required this.workCount,
  });

  factory SummaryStats.fromJson(Map<String, dynamic> json) =>
      _$SummaryStatsFromJson(json);

  Map<String, dynamic> toJson() => _$SummaryStatsToJson(this);
}

@JsonSerializable()
class ChartData {
  final String name;
  final double value;

  const ChartData({required this.name, required this.value});

  factory ChartData.fromJson(Map<String, dynamic> json) =>
      _$ChartDataFromJson(json);

  Map<String, dynamic> toJson() => _$ChartDataToJson(this);
}
